package com.aqumon.www.service;

import com.aqumon.www.entity.persistent.RaaSTestAcc;
import com.aqumon.www.entity.request.data.RaaSAccAddReq;
import com.aqumon.www.entity.request.data.RaaSAccEditReq;
import com.aqumon.www.entity.request.data.RaaSAccQueryReq;
import com.aqumon.www.entity.request.data.RaaSAccountImportReq;
import com.aqumon.www.entity.response.controller.PageModule;
import com.aqumon.www.entity.response.data.RaaSAccListResp;
import com.baomidou.mybatisplus.extension.service.IService;
import org.springframework.transaction.annotation.Transactional;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;

/**
 * <p>
 * raas 测试账号 服务类
 * </p>
 *
 * @author aqumon
 * @since 2022-06-02
 */
public interface RaaSTestAccService extends IService<RaaSTestAcc> {
    /**
     * 导入excel文件
     *
     * @param req 请求体
     * @param request
     * @return 生成 id
     * @throws Exception 任何可能的异常
     */
    List<RaaSTestAcc> importAccountExcel(RaaSAccountImportReq req, HttpServletRequest request) throws Exception;

    List<RaaSTestAcc> importAccExcel(RaaSAccountImportReq req, HttpServletRequest request) throws Exception;

    void exportAccExcel(ArrayList<String> ids, HttpServletResponse response) throws IOException;

    @Transactional
    PageModule<RaaSAccListResp>  getRaaSAccList(RaaSAccQueryReq raaSAccQueryReq);

    int saveAccount(RaaSAccAddReq raaSAccAddReq);

    int editAccount(RaaSAccEditReq raaSAccEditReq);

    Boolean delAcc(Long id);
}
